$(function () {
    $.ajax({
        type: "get",
        url: "../php/fav.php",
        dataType: "json",
        success: function (res) {
            console.log(res);
            var html = template('userTmp', {
                data: res
            })
            console.log(html);
            $('#userTmpy').html(html);
        }
    });
});